import request from '@/utils/request'

// 获取车辆分页数据
export function getCarData(params) {
  return request('/manager/truck/page', { params })
}

// 获取车辆类型列表
export function getCarList() {
  return request('/manager/truckType/simple')
}

// 添加车辆
export function addCar(data) {
  return request.post('/manager/truck', data)
}

// 获取车辆详情
export function getCarParticulars(id) {
  return request(`/manager/truck/${id}`)
}

// 更新车辆信息
export function updateCarParticulars(id) {
  return request.put(`/manager/truck/${id}`)
}

// 禁用车辆
export function blockCarParticulars(id) {
  return request.put(`/manager/disable/${id}`)
}

// 启用车辆
export function startCarParticulars(id) {
  return request.put(`/manager/enable/${id}`)
}

// 获取绑定的司机
export function getBindingDrivers(id) {
  return request(`/manager/bindingDrivers/${id}`)
}

